Skip to content

feat(config): add doc-kit.config.mjs for webpack branding#42

Merged
avivkeller merged 2 commits intowebpack:mainfrom
sujalgoel:feat/doc-kit-config
Mar 22, 2026
Merged

feat(config): add doc-kit.config.mjs for webpack branding#42
avivkeller merged 2 commits intowebpack:mainfrom
sujalgoel:feat/doc-kit-config

Conversation

@sujalgoel
Copy link
Contributor

@sujalgoel sujalgoel commented Mar 22, 2026

Summary

Adds doc-kit.config.mjs to configure @node-core/doc-kit with webpack-specific settings, addressing #6.

Changes:

  • Sets global.repository to webpack/webpack — the GitHub link in the navbar now correctly points to the webpack repo instead of nodejs/node
  • Sets web.title to webpack — the product name in sidebar version labels and navbar aria-labels now says "webpack" instead of "Node.js"
  • Sets jsx-ast.editURL to '' — disables the "Edit this page" link since webpack API docs are generated from TypeScript types and have no hand-editable source file
  • Updates build-html script to pass --config-file ./doc-kit.config.mjs and adds mkdir -p out so the output directory is created automatically (no more ENOENT on first run)

Note: The <title> tag in generated HTML still hardcodes "Node.js" — this is in @node-core/doc-kit source and requires an upstream fix to make the product name configurable via web.title.

Test plan

  • npm run build-html succeeds without a pre-existing out/ directory
  • Generated HTML navbar GitHub link points to https://github.com/webpack/webpack
  • NavBar aria-label reads "webpack GitHub" instead of "Node.js GitHub"
  • No "Edit this page" links pointing to nodejs/node

- Set repository to webpack/webpack (fixes GitHub links in navbar)
- Set web.title to webpack (fixes product name in sidebar/navbar labels)
- Disable jsx-ast editURL (generated docs have no hand-editable source)
- Fix build-html script to auto-create out/ directory before generation

Closes webpack#6
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 22, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: avivkeller / name: Aviv Keller (1515f89)
  • ✅ login: sujalgoel / name: Sujal Goel (8c009c3)

Copy link
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I'll make the upstream changes needed for this

Comment on lines +16 to +18
// Disable the "Edit this page" link — webpack API docs are generated from
// TypeScript types and don't have a corresponding hand-editable source file.
editURL: '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO(me): if editURL is not supplied, don't show it on doc-kit

@avivkeller avivkeller merged commit 424ae85 into webpack:main Mar 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants